home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_204 / popdir / popdir.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  7KB  |  219 lines

  1. #include <intuition/intuitionbase.h>
  2. #include <graphics/gfxbase.h>
  3. #include <libraries/dosextens.h>
  4. #include <exec/memory.h>
  5. #include <exec/tasks.h>
  6.  
  7. #define DIR 1
  8. #define DF0 2
  9. #define DF1 3
  10. #define DF2 4
  11. #define DF3 5
  12. #define DH0 6
  13. #define DH1 7
  14. #define VD0 8
  15. #define VDK 9
  16. #define RAM 10
  17. #define RAD 11
  18. #define SYS 12
  19. #define C 13
  20. #define IRQCHECK 14
  21.  
  22. /* Image-Ed Image generation */
  23.  
  24. /* Start of Image data */
  25. USHORT popgadImageData[]={
  26.    /* Plane 0 */
  27.    0x0000, 0x0000, 0x7fff, 0xf800, 0x5fbd, 0xf800, 
  28.    0x5d75, 0xd800, 0x5d75, 0xd800, 0x5f75, 0xf800, 
  29.    0x5f75, 0xf800, 0x5f75, 0xf800, 0x5fbd, 0xf800, 
  30.    0x7fff, 0xf800, 0x5f7d, 0xf800, 0x5ddd, 0xd800, 
  31.    0x5ddd, 0xd800, 0x5ddd, 0xf800, 0x5ddd, 0x7800, 
  32.    0x5ddd, 0xb800, 0x5f7d, 0xd800, 0x7fff, 0xf800, 
  33.    0x0000, 0x0000, 
  34.    /* Plane 1 */
  35.    0xffff, 0xfc00, 0xffff, 0xfc00, 0xe1c6, 0x1c00, 
  36.    0xeeba, 0xec00, 0xeeba, 0xec00, 0xe1ba, 0x1c00, 
  37.    0xefba, 0xfc00, 0xefba, 0xfc00, 0xefc6, 0xfc00, 
  38.    0xffff, 0xfc00, 0xe182, 0x1c00, 0xeeee, 0xec00, 
  39.    0xeeee, 0xec00, 0xeeee, 0x1c00, 0xeeee, 0xbc00, 
  40.    0xeeee, 0xdc00, 0xe182, 0xec00, 0xffff, 0xfc00, 
  41.    0xffff, 0xfc00
  42. };
  43. /* End of Image data */
  44.  
  45. struct Image popgadImage={
  46.     0,0,     /* LeftEdge, TopEdge */
  47.     22,19,2,     /* Width, Height, Depth */
  48.     &popgadImageData[0],     /* ImageData */
  49.     0x3,0x0,     /* PlanePick, PlaneOnOff */
  50.     NULL     /* NextImage */
  51. };
  52.  
  53. /* Image-Ed Image generation */
  54.  
  55. /* Start of Image data */
  56. USHORT popgad2ImageData[]={
  57.    /* Plane 0 */
  58.    0x0000, 0x0000, 0x7fff, 0xf800, 0x7e7f, 0xf800, 
  59.    0x7cff, 0xf800, 0x7cff, 0xf800, 0x7cff, 0xf800, 
  60.    0x7cff, 0xf800, 0x7cff, 0xf800, 0x7e7f, 0xf800, 
  61.    0x7e7f, 0xf800, 0x7e7f, 0xf800, 0x7e7f, 0xf800, 
  62.    0x7f3f, 0xf800, 0x7fff, 0xf800, 0x7f3f, 0xf800, 
  63.    0x7f3f, 0xf800, 0x7f3f, 0xf800, 0x7fff, 0xf800, 
  64.    0x0000, 0x0000, 
  65.    /* Plane 1 */
  66.    0xffff, 0xfc00, 0xffff, 0xfc00, 0xff83, 0xfc00, 
  67.    0xff01, 0xfc00, 0xff01, 0xfc00, 0xff01, 0xfc00, 
  68.    0xff01, 0xfc00, 0xff01, 0xfc00, 0xff83, 0xfc00, 
  69.    0xff83, 0xfc00, 0xff83, 0xfc00, 0xff83, 0xfc00, 
  70.    0xffc7, 0xfc00, 0xffff, 0xfc00, 0xffc7, 0xfc00, 
  71.    0xffc7, 0xfc00, 0xffc7, 0xfc00, 0xffff, 0xfc00, 
  72.    0xffff, 0xfc00 
  73. };
  74. /* End of Image data */
  75.  
  76. struct Image popgad2Image={
  77.     0,0,     /* LeftEdge, TopEdge */
  78.     22,19,20,     /* Width, Height, Depth */
  79.     &popgad2ImageData[0],     /* ImageData */
  80.     0x3,0x0,     /* PlanePick, PlaneOnOff */
  81.     NULL     /* NextImage */
  82. };
  83.  
  84. /* End of Image-Ed Image generation */
  85.  
  86. struct Gadget popgad={
  87.     NULL,0,0,22,19,GADGHIMAGE|GADGIMAGE,RELVERIFY,BOOLGADGET,&popgadImage,
  88.     &popgad2Image,NULL,NULL,NULL,NULL,NULL};
  89.  
  90. char dobuffer[80]="DF0:", undobuffer[80];
  91. struct StringInfo StrGadInfo={
  92.     dobuffer,undobuffer,0,80,0};
  93. short StrGadBorXY[]={
  94.     -2,-1,332,-1,332,10,-2,10,-2,-1};
  95. struct Border StrGadBor={
  96.     -1,-1,1,0,JAM1,5,StrGadBorXY,NULL};
  97. struct Gadget StrGad={
  98.     NULL,10,15,329,15,GADGHCOMP,RELVERIFY,STRGADGET,&StrGadBor,NULL,
  99.     NULL,NULL,&StrGadInfo,DIR,NULL};
  100.  
  101. short BoxGadBorXY[]={
  102.     0,0,40,0,40,20,0,20,0,0};
  103. struct Border BoxGadBor={
  104.     -1,-1,1,0,JAM1,5,BoxGadBorXY,NULL};
  105.  
  106. struct IntuiText cGadText={
  107.     1,0,JAM1,12,6,NULL,"C:",NULL};
  108. struct Gadget cGad={
  109.     &StrGad,134,52,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  110.     &cGadText,NULL,NULL,C,NULL};
  111.  
  112. struct IntuiText sysGadText={
  113.     1,0,JAM1,4,6,NULL,"SYS:",NULL};
  114. struct Gadget sysGad={
  115.     &cGad,92,52,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  116.     &sysGadText,NULL,NULL,SYS,NULL};
  117.  
  118. struct IntuiText radGadText={
  119.     1,0,JAM1,4,6,NULL,"RAD:",NULL};
  120. struct Gadget radGad={
  121.     &sysGad,50,52,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  122.     &radGadText,NULL,NULL,RAD,NULL};
  123.  
  124. struct IntuiText ramGadText={
  125.     1,0,JAM1,4,6,NULL,"RAM:",NULL};
  126. struct Gadget ramGad={
  127.     &radGad,8,52,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  128.     &ramGadText,NULL,NULL,RAM,NULL};
  129.  
  130. struct IntuiText vdkGadText={
  131.     1,0,JAM1,4,6,NULL,"VDK:",NULL};
  132. struct Gadget vdkGad={
  133.     &ramGad,302,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  134.     &vdkGadText,NULL,NULL,VDK,NULL};
  135.  
  136. struct IntuiText vd0GadText={
  137.     1,0,JAM1,4,6,NULL,"VD0:",NULL};
  138. struct Gadget vd0Gad={
  139.     &vdkGad,260,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  140.     &vd0GadText,NULL,NULL,VD0,NULL};
  141.  
  142. struct IntuiText dh1GadText={
  143.     1,0,JAM1,4,6,NULL,"DH1:",NULL};
  144. struct Gadget dh1Gad={
  145.     &vd0Gad,218,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  146.     &dh1GadText,NULL,NULL,DH1,NULL};
  147.  
  148. struct IntuiText dh0GadText={
  149.     1,0,JAM1,4,6,NULL,"DH0:",NULL};
  150. struct Gadget dh0Gad={
  151.     &dh1Gad,176,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  152.     &dh0GadText,NULL,NULL,DH0,NULL};
  153.  
  154. struct IntuiText df3GadText={
  155.     1,0,JAM1,4,6,NULL,"DF3:",NULL};
  156. struct Gadget df3Gad={
  157.     &dh0Gad,134,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  158.     &df3GadText,NULL,NULL,DF3,NULL};
  159.  
  160. struct IntuiText df2GadText={
  161.     1,0,JAM1,4,6,NULL,"DF2:",NULL};
  162. struct Gadget df2Gad={
  163.     &df3Gad,92,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  164.     &df2GadText,NULL,NULL,DF2,NULL};
  165.  
  166. struct IntuiText df1GadText={
  167.     1,0,JAM1,4,6,NULL,"DF1:",NULL};
  168. struct Gadget df1Gad={
  169.     &df2Gad,50,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  170.     &df1GadText,NULL,NULL,DF1,NULL};
  171.  
  172. struct IntuiText df0GadText={
  173.     1,0,JAM1,4,6,NULL,"DF0:",NULL};
  174. struct Gadget df0Gad={
  175.     &df1Gad,8,30,39,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&BoxGadBor,NULL,
  176.     &df0GadText,NULL,NULL,DF0,NULL};
  177.  
  178. short DirGadBorXY[]={
  179.     0,0,82,0,82,20,0,20,0,0};
  180. struct Border DirGadBor={
  181.     -1,-1,1,0,JAM1,5,DirGadBorXY,NULL};
  182.  
  183. struct IntuiText IRQText={
  184.     1,0,JAM1,5,6,NULL, "IRQ Check",NULL};
  185. struct Gadget IRQGad={
  186.     &df0Gad,176,52,81,19,GADGHCOMP,RELVERIFY|TOGGLESELECT,BOOLGADGET,
  187.     &DirGadBor,NULL,&IRQText,NULL,NULL,IRQCHECK,NULL};
  188.  
  189. struct IntuiText DirGadText={
  190.     1,0,JAM1,29,6,NULL,"Dir",NULL};
  191. struct Gadget DirGad={
  192.     &IRQGad,260,52,81,19,GADGHCOMP,RELVERIFY,BOOLGADGET,&DirGadBor,NULL,
  193.     &DirGadText,NULL,NULL,DIR,NULL};
  194.  
  195. struct NewWindow small={
  196.     30,11,22,19,-1,-1,GADGETUP,BORDERLESS|SMART_REFRESH,&popgad,NULL,NULL,
  197.     NULL,NULL,0,0,0,0,WBENCHSCREEN};
  198. struct NewWindow med={
  199.     30,11,349,75,-1,-1,GADGETUP|CLOSEWINDOW|INACTIVEWINDOW,
  200.     WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG|ACTIVATE|RMBTRAP|SMART_REFRESH,
  201.     &DirGad,NULL,"PopDir v1.4 by Jonathan Potter",NULL,NULL,0,0,0,0,WBENCHSCREEN};
  202. struct NewWindow big={
  203.     0,0,640,200,-1,-1,CLOSEWINDOW|VANILLAKEY,
  204.     WINDOWCLOSE|WINDOWDEPTH|WINDOWDRAG|ACTIVATE|RMBTRAP|SMART_REFRESH,
  205.     NULL,NULL,NULL,NULL,NULL,0,0,0,0,WBENCHSCREEN};
  206.  
  207. char ToPrint[80];
  208. struct IntuiText Files={
  209.     1,0,JAM2,0,0,NULL,ToPrint,NULL};
  210.  
  211. struct IntuitionBase *IntuitionBase;
  212. struct GfxBase *GfxBase;
  213. struct IntuiMessage *Msg;
  214. struct Window *Window;
  215. struct FileLock *lock, *oldlock;
  216. struct FileInfoBlock *finfo;
  217.  
  218. int NonExTotal,VirTotal,CleanTotal,KilledTotal;
  219.